USE [basedata]
GO

/****** Object:  StoredProcedure [dbo].[getVdnLog]    Script Date: 04/21/2015 00:40:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[getVdnLog]
	-- Add the parameters for the stored procedure here
	@vdnno varchar

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT  * from VDNLog where vdnid like @vdnno
END


ALTER PROCEDURE [dbo].[getVdnLogPage]
	-- Add the parameters for the stored procedure here
	 @count int output,
	@vdnno varchar

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
select @count=COUNT(*)  from VDNLog where vdnid like @vdnno
    -- Insert statements for procedure here
    if (@count!=0 )
		SELECT  * from VDNLog where vdnid like @vdnno
END

GO


